home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / graphics / n-z / printfractal / rexx / print.mnd2
Encoding:
Text File  |  1996-01-14  |  1.1 KB  |  48 lines

  1. /*
  2. ** Print.mnd2
  3. ** written by Michael Baumgaertner
  4. ** 
  5. ** Use this script with Mand2000 to print Fractals.
  6. **
  7. ** This script will get the actual parameters from Mand2000
  8. ** and pass it to PrintFractal.
  9. ** Typically this command is run from the menus of Mand2000.
  10. **
  11. ** If PrintFractal is not running this script will try to
  12. ** start it up.
  13. */
  14.  
  15. OPTIONS RESULTS
  16.  
  17. /* Get the current port */
  18. portname = ADDRESS()
  19. /* If the portname starts with MAND2000 use it */
  20. /* otherwise use port MAND2000.1 */
  21. IF(LEFT(portname,8) ~= 'MAND2000') THEN
  22.     ADDRESS 'MAND2000.1'
  23.  
  24. /* Ask for the current attributes */
  25. GETATTR stem F
  26.  
  27. /* Get PrintFractals public port */
  28. pf = POS('PRINTFRACTAL',SHOW('p'))
  29. /* If we got it use it */
  30. /* otherwise try to run PrintFractal */
  31. IF pf ~= 0 THEN
  32.     ADDRESS 'PRINTFRACTAL'
  33.  
  34. /* Build argument string */
  35. frac = 'L='F.LEFT' R='F.RIGHT' T='F.TOP' B='F.BOTTOM' I='F.MAXITERS' LIMIT=4'
  36.  
  37. /* Check for Fractaltype */
  38. IF((F.FRACTALTYPE //2) = 1) THEN
  39.     /* Julia type: setup parameter */
  40.     'setfractal TYPE=Julia REAL='F.JULIAX' IMAG='F.JULIAY' 'frac
  41. ELSE
  42.     /* Mandelbrot type: setup parameter */
  43.     'setfractal TYPE=Mandelbrot REAL=0 IMAG=0 'frac
  44.  
  45. 'TOFRONT'
  46.  
  47. EXIT
  48.